1. Field of the Invention
This invention is related to memories in digital systems and, more particularly, to data randomization/scrambling mechanisms for memories.
2. Description of the Related Art
Certain memories used in digital systems can experience data loss if too many physically-proximate data bits in the memory have the same bit value and surround a bit of the opposite value. That is, if too many bits in physical proximity are zeros, data loss can occur for a one near the zeros. Similarly, if too many bits in physical proximity are ones, data loss can occur for a zero near the ones. More particularly, certain nonvolatile memories such as flash memories are subject to time decay in the electrical charge that represents each bit. As the charge decays, the data bit eventually cannot be reliably read (e.g. the probability of reading the same bit value that was previously written decreases). The rate of decay can increase in the memories if many nearby bits have the opposite value of the bit. To retain the data for a specified period of time, the rate of decay needs to be controlled. Accordingly, such memories specify a maximum number of nearby bits that can have the same value, as well as a lifetime for the data assuming that the maximum number is not exceeded.
On the other hand, the data to be stored in the memory may actually have significant clustering of the same bit value. For example, some data may tend to have many more zero bits than one bits, or vice versa. In order to meet the required mix of zeros and ones, controllers for the memory typically implement data randomization, or data scrambling. The data randomization/scrambling mechanisms use reproducible pseudo-random modifications to change the data written to memory, and to change the data back to the original data when read from the memory. By changing the data, the mix of ones and zeros is changed in an attempt to meet the specifications.
Data scrambling is applied to each row of data, seeding the pseudo-random circuitry with the address of the row. Such mechanisms result in reasonable randomization of the data in a given row. However, nearby rows are seeded with addresses that are nearly the same, and thus often receive similar randomization. Accordingly, the data along a column is not randomized very well, and thus data loss can be accelerated due to too many consecutive data bits in a column having the same value.